import { EntityModel } from "@midwayjs/orm";
import {Column, PrimaryGeneratedColumn, OneToOne} from 'typeorm'
import {Petpic} from './petpic'

@EntityModel('pet')
export class Pet {
    @PrimaryGeneratedColumn()
    id:number;

    @Column()
    name: string;

    @Column()
    ownerid: string;

    @Column()
    kindid:string;
    
    @Column()
    sex:string;

    @Column()
    age:string;

    @OneToOne(type => Petpic,petpic => petpic.pet, { cascade: true })
   
    petpic: Petpic;
  
}